home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 February / SGI IRIX 6.5 Complementary Applications 2004 February.iso / dist / patchSG0004915.idb / usr / ToolTalk / include / tttk.h.z / tttk.h
Encoding:
C/C++ Source or Header  |  2003-08-19  |  10.1 KB  |  424 lines

  1. /*
  2.  * tttk.h
  3.  *
  4.  * Copyright 2002, Silicon Graphics, Inc.
  5.  * ALL RIGHTS RESERVED
  6.  * 
  7.  * UNPUBLISHED -- Rights reserved under the copyright laws of the United
  8.  * States.   Use of a copyright notice is precautionary only and does not
  9.  * imply publication or disclosure.
  10.  *
  11.  * U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:
  12.  * Use, duplication or disclosure by the Government is subject to restrictions
  13.  * as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights
  14.  * in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or
  15.  * in similar or successor clauses in the FAR, or the DOD or NASA FAR
  16.  * Supplement.  Contractor/manufacturer is Silicon Graphics, Inc.,
  17.  * 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
  18.  *
  19.  * THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY
  20.  * INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION,
  21.  * DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY
  22.  * PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON
  23.  * GRAPHICS, INC.
  24.  */
  25. /* $XConsortium: tttk.h /main/cde1_maint/1 1995/07/17 17:15:09 drk $ */
  26. /*%%  (c) Copyright 1993, 1994 Hewlett-Packard Company             */
  27. /*%%  (c) Copyright 1993, 1994 International Business Machines Corp.     */
  28. /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.             */
  29. /*%%  (c) Copyright 1993, 1994 Novell, Inc.                  */
  30.  
  31. /*
  32.  * @(#)tttk.h    1.11 93/09/29
  33.  */
  34.  
  35.  /* Note : The tttk api described by this header file is optional and may 
  36.   * not be present in older versions of the tooltalk developer libraries.
  37.   */
  38.  
  39. #ifndef tttk_h
  40. #define tttk_h
  41.  
  42. #include <Tt/tt_c.h>
  43. #include <X11/Intrinsic.h>
  44.  
  45. #if defined(__cplusplus)
  46. extern "C" {
  47. #endif
  48.  
  49. typedef enum {
  50.     TTDT_OP_NONE,
  51.     TTDT_CREATED,
  52.     TTDT_DELETED,
  53.     TTDT_DO_COMMAND,
  54.     TTDT_SET_ENVIRONMENT,
  55.     TTDT_GET_ENVIRONMENT,
  56.     TTDT_SET_GEOMETRY,
  57.     TTDT_GET_GEOMETRY,
  58.     TTDT_SET_ICONIFIED,
  59.     TTDT_GET_ICONIFIED,
  60.     TTDT_SET_LOCALE,
  61.     TTDT_GET_LOCALE,
  62.     TTDT_SET_MAPPED,
  63.     TTDT_GET_MAPPED,
  64.     TTDT_MODIFIED,
  65.     TTDT_REVERTED,
  66.     TTDT_GET_MODIFIED,
  67.     TTDT_MOVED,
  68.     TTDT_PAUSE,
  69.     TTDT_RESUME,
  70.     TTDT_QUIT,
  71.     TTDT_RAISE,
  72.     TTDT_LOWER,
  73.     TTDT_SAVE,
  74.     TTDT_REVERT,
  75.     TTDT_SAVED,
  76.     TTDT_SET_SITUATION,
  77.     TTDT_GET_SITUATION,
  78.     TTDT_SIGNAL,
  79.     TTDT_STARTED,
  80.     TTDT_STOPPED,
  81.     TTDT_STATUS,
  82.     TTDT_GET_STATUS,
  83.     TTDT_GET_SYSINFO,
  84.     TTDT_SET_XINFO,
  85.     TTDT_GET_XINFO,
  86.     TTME_ABSTRACT,
  87.     TTME_DEPOSIT,
  88.     TTME_DISPLAY,
  89.     TTME_EDIT,
  90.     TTME_COMPOSE,
  91.     TTME_INTERPRET,
  92.     TTME_PRINT,
  93.     TTME_TRANSLATE,
  94.     TTME_MAIL,
  95.     TTME_MAIL_COMPOSE,
  96.     TTME_MAIL_EDIT,
  97.     TTME_INSTANTIATE,
  98.     TTDT_OP_LAST
  99. } Tttk_op;
  100.  
  101. /*
  102.  * Standard vtype names
  103.  */
  104. extern const char      *Tttk_integer;
  105. extern const char      *Tttk_string;
  106. extern const char      *Tttk_boolean;
  107. extern const char      *Tttk_file;
  108. extern const char      *Tttk_message_id;
  109. extern const char      *Tttk_title;
  110. extern const char      *Tttk_width;
  111. extern const char      *Tttk_height;
  112. extern const char      *Tttk_xoffset;
  113. extern const char      *Tttk_yoffset;
  114.  
  115. #pragma optional Tttk_integer
  116. #pragma optional Tttk_string
  117. #pragma optional Tttk_boolean
  118. #pragma optional Tttk_file
  119. #pragma optional Tttk_message_id
  120. #pragma optional Tttk_title
  121. #pragma optional Tttk_width
  122. #pragma optional Tttk_height
  123. #pragma optional Tttk_xoffset
  124. #pragma optional Tttk_yoffset
  125.  
  126. /*
  127.  **********************************************************************
  128.  *
  129.  * Procid lifecycle
  130.  *
  131.  **********************************************************************
  132.  */
  133. char               *ttdt_open(
  134.                 int           *tt_fd,
  135.                 const char     *toolname,
  136.                 const char     *vendor,
  137.                 const char     *version,
  138.                 int        sendStarted
  139.             );
  140. Tt_status        ttdt_sender_imprint_on(
  141.                 const char     *handler,
  142.                 Tt_message    commission,
  143.                 char          **display,
  144.                 int           *width,
  145.                 int           *height,
  146.                 int           *xoffset,
  147.                 int           *yoffset,
  148.                 XtAppContext    app2run,
  149.                 int        ms_timeout
  150.             );
  151. Tt_status        ttdt_close(
  152.                 const char     *procid,
  153.                 const char     *newprocid,
  154.                 int        sendStopped
  155.             );
  156.  
  157. #pragma optional ttdt_open
  158. #pragma optional ttdt_sender_imprint_on
  159. #pragma optional ttdt_close
  160.  
  161. /*
  162.  **********************************************************************
  163.  *
  164.  * Sessions
  165.  *
  166.  **********************************************************************
  167.  */
  168. typedef Tt_message    (*Ttdt_contract_cb)(
  169.                 Tt_message    msg,
  170.                 void           *clientdata,
  171.                 Tt_message    contract
  172.             );
  173. Tt_pattern           *ttdt_session_join(
  174.                 const char           *sessid,
  175.                 Ttdt_contract_cb    cb,
  176.                 Widget            shell,
  177.                 void               *clientdata,
  178.                                 int            join
  179.             );
  180. Tt_status        ttdt_session_quit(
  181.                 const char     *sessid,
  182.                 Tt_pattern     *sess_pats,
  183.                                 int        quit
  184.             );
  185.  
  186. #pragma optional ttdt_session_join
  187. #pragma optional ttdt_session_quit
  188.  
  189. /*
  190.  **********************************************************************
  191.  *
  192.  * Contracts
  193.  *
  194.  **********************************************************************
  195.  */
  196. Tt_pattern           *ttdt_message_accept(
  197.                 Tt_message    contract,
  198.                 Ttdt_contract_cb    cb,
  199.                 Widget        shell,
  200.                 void           *clientdata,
  201.                 int        accept,
  202.                 int        sendStatus
  203.             );
  204. Tt_pattern           *ttdt_subcontract_manage(
  205.                 Tt_message    subcontract,
  206.                 Ttdt_contract_cb cb,
  207.                 Widget        shell,
  208.                 void           *clientdata
  209.             );
  210.  
  211. #pragma optional ttdt_message_accept
  212. #pragma optional ttdt_subcontract_manage
  213.  
  214. /*
  215.  **********************************************************************
  216.  *
  217.  * Desktop: Files
  218.  *
  219.  **********************************************************************
  220.  */
  221. typedef Tt_message    (*Ttdt_file_cb)(
  222.                 Tt_message    msg,
  223.                 Tttk_op        op,
  224.                 char           *pathname,
  225.                 void           *clientdata,
  226.                 int        same_euid_egid,
  227.                 int        same_procid
  228.             );
  229. Tt_pattern           *ttdt_file_join(
  230.                                 const char     *pathname,
  231.                                 Tt_scope    scope,
  232.                 int        join,
  233.                 Ttdt_file_cb    cb,
  234.                 void           *clientdata
  235.             );
  236. Tt_status        ttdt_file_event(
  237.                 Tt_message    context,
  238.                 Tttk_op        event,
  239.                 Tt_pattern     *patterns,
  240.                 int        send
  241.             );
  242. Tt_status        ttdt_file_quit(
  243.                 Tt_pattern     *patterns,
  244.                 int        quit
  245.             );
  246. int            ttdt_Get_Modified(
  247.                 Tt_message    context,
  248.                 const char     *pathname,
  249.                                 Tt_scope    scope,
  250.                 XtAppContext    app2run,
  251.                 int        ms_timeout
  252.             );
  253. Tt_status        ttdt_Save(
  254.                 Tt_message    context,
  255.                 const char     *pathname,
  256.                                 Tt_scope    scope,
  257.                 XtAppContext    app2run,
  258.                 int        ms_timeout
  259.             );
  260. Tt_status        ttdt_Revert(
  261.                 Tt_message    context,
  262.                 const char     *pathname,
  263.                                 Tt_scope    scope,
  264.                 XtAppContext    app2run,
  265.                 int        ms_timeout
  266.             );
  267. Tt_message        ttdt_file_notice(
  268.                 Tt_message    context,
  269.                 Tttk_op        op,
  270.                 Tt_scope    scope,
  271.                 const char     *file,
  272.                 int        send_and_destroy
  273.             );
  274. Tt_message        ttdt_file_request(
  275.                 Tt_message    context,
  276.                 Tttk_op        op,
  277.                 Tt_scope    scope,
  278.                 const char     *file,
  279.                 Ttdt_file_cb    cb,
  280.                 void           *clientdata,
  281.                 int        send
  282.             );
  283.  
  284. #pragma optional ttdt_file_join
  285. #pragma optional ttdt_file_notice
  286. #pragma optional ttdt_file_request
  287. #pragma optional ttdt_file_event
  288. #pragma optional ttdt_file_quit
  289. #pragma optional ttdt_Get_Modified
  290. #pragma optional ttdt_Save
  291. #pragma optional ttdt_Revert
  292.  
  293. /*
  294.  **********************************************************************
  295.  *
  296.  * Media Exchange
  297.  *
  298.  **********************************************************************
  299.  */
  300. typedef Tt_message    (*Ttmedia_load_pat_cb)(
  301.                 Tt_message    msg,
  302.                 void           *clientdata,
  303.                 Tttk_op        op,
  304.                 Tt_status    diagnosis,
  305.                 unsigned char  *contents,
  306.                 int             len,
  307.                 char           *file,
  308.                 char           *docname
  309.             );
  310. Tt_status        ttmedia_ptype_declare(
  311.                 const char     *ptype,
  312.                 int        base_opnum,
  313.                 Ttmedia_load_pat_cb    cb,
  314.                 void           *clientdata,
  315.                 int        declare
  316.             );
  317. typedef Tt_message    (*Ttmedia_load_msg_cb)(
  318.                 Tt_message    msg,
  319.                 void           *clientdata,
  320.                 Tttk_op        op,
  321.                 unsigned char  *contents,
  322.                 int             len,
  323.                 char           *file
  324.             );
  325. Tt_message        ttmedia_load(
  326.                 Tt_message        context,
  327.                 Ttmedia_load_msg_cb    cb,
  328.                 void               *clientdata,
  329.                 Tttk_op            op,
  330.                 const char           *media_type,
  331.                 const unsigned char    *contents,
  332.                 int            len,
  333.                 const char           *file,
  334.                 const char           *docname,
  335.                 int            send
  336.             );
  337. Tt_status        ttmedia_load_reply(
  338.                 Tt_message        contract,
  339.                 const unsigned char    *new_contents,
  340.                 int                 new_len,
  341.                 int            reply_and_destroy
  342.             );
  343. Tt_status        ttmedia_Deposit(
  344.                 Tt_message        contract,
  345.                 const char           *buffer_id,
  346.                 const char           *media_type,
  347.                 const unsigned char    *new_contents,
  348.                 int                 new_len,
  349.                 const char            *file,
  350.                 XtAppContext        app2run,
  351.                 int            ms_timeout
  352.             );
  353.  
  354. #pragma optional ttmedia_ptype_declare
  355. #pragma optional ttmedia_load
  356. #pragma optional ttmedia_load_reply
  357. #pragma optional ttmedia_Deposit
  358.  
  359. /*
  360.  **********************************************************************
  361.  *
  362.  * ToolTalk Toolkit
  363.  *
  364.  **********************************************************************
  365.  */
  366. void            tttk_Xt_input_handler(
  367.                 XtPointer        procid,
  368.                 int               *,
  369.                 XtInputId           *
  370.             );
  371. Tt_status        tttk_block_while(
  372.                 XtAppContext        app2run,
  373.                 const int           *blocked,
  374.                 int            ms_timeout
  375.             );
  376. Tt_message        tttk_message_create(
  377.                 Tt_message        context,
  378.                 Tt_class        the_class,
  379.                 Tt_scope        the_scope,
  380.                 const char           *handler,
  381.                 const char           *op,
  382.                 Tt_message_callback    callback
  383.             );
  384. Tt_status        tttk_message_destroy(
  385.                 Tt_message        msg
  386.             );
  387. Tt_status        tttk_message_reject(
  388.                 Tt_message        msg,
  389.                 Tt_status        status,
  390.                 const char           *status_string,
  391.                 int            destroy
  392.             );
  393. Tt_status        tttk_message_fail(
  394.                 Tt_message        msg,
  395.                 Tt_status        status,
  396.                 const char        *status_string,
  397.                 int            destroy
  398.             );
  399. Tt_status        tttk_message_abandon(
  400.                 Tt_message        msg
  401.             );
  402. Tttk_op            tttk_string_op(
  403.                 const char     *s
  404.             );
  405. char               *tttk_op_string(
  406.                 Tttk_op        op
  407.             );
  408.  
  409. #pragma optional tttk_Xt_input_handler
  410. #pragma optional tttk_block_while
  411. #pragma optional tttk_message_create
  412. #pragma optional tttk_message_destroy
  413. #pragma optional tttk_message_reject
  414. #pragma optional tttk_message_fail
  415. #pragma optional tttk_message_abandon
  416. #pragma optional tttk_string_op
  417. #pragma optional tttk_op_string
  418.  
  419. #if defined(__cplusplus)
  420. }
  421. #endif
  422.  
  423. #endif
  424.